function useCollapse(option?: {defaultVisible: boolean}) {
  const collapseVisible = ref(option?.defaultVisible ? option.defaultVisible : false)

  function openCollapse() {
    collapseVisible.value = true
  }

  function closeCollapse() {
    collapseVisible.value = false
  }

  return {
    collapseVisible,
    openCollapse,
    closeCollapse
  }
}

export default useCollapse
